home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 November / CHIP Kasım 1997.iso / ARACLAR / TER500 / 500TER._XE / SCRIPT.EXE / IF-TEST.TSL < prev    next >
Encoding:
Text File  |  1995-08-10  |  1.4 KB  |  43 lines

  1. % -----------------------------------------------------------------------------
  2. % Demonstration of decision structures                 *TERMINATE PRESCRIPTION*
  3. % -----------------------------------------------------------------------------
  4. %
  5. %  Version          : 1.00
  6. %  Filename         : IF-TEST.TSL
  7. %  Company          : BLOKKER+BLOKKER Software
  8. %  Programmer       : Joop Blokker
  9. %  Module created   : 09-Aug-95
  10. %  Latest revision  : 09-Aug-95
  11. %  Language/version : Terminate Prescription 1.00
  12. %  Remarks          : Multi IF - ELSE - ENDIF sieve structure
  13. %
  14. % -----------------------------------------------------------------------------
  15. %
  16. ClearScreen
  17. Set A = 3                                % initialize A
  18. println "A = ", A                        % show A
  19. println ""
  20. println "Result must be    : Three"      % predict result
  21. println ""
  22. print   "...the result is  : "
  23. if A=0                                   % is it 0 ?
  24.   println "Nought"
  25. else
  26.   if A=1                                 % is it 1 ?
  27.     println "One"
  28.   else
  29.     if A=2                               % is it 2 ?
  30.       println "Two"
  31.     else
  32.       if A=3                             % is it 3 ?
  33.         println "Three"                  % Bingo!
  34.       endif
  35.     endif
  36.   endif
  37. endif
  38. println ""
  39. print "Press Enter, please..."           % wait
  40. WaitEnter
  41. ClearScreen                              % clean up
  42. TERMINATE
  43.